package com.elitesland.metadata.service;

import com.elitesland.core.base.PagingVO;
import com.elitesland.metadata.param.MetaFieldQParam;
import com.elitesland.metadata.param.MetaFieldSaveParam;
import com.elitesland.metadata.vo.MetaFieldVO;

import java.util.List;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;

/**
 * <pre>作用说明</pre>
 *
 * @author mir
 * @date 11/21/2020 2:29 AM
 */
public interface MetaFieldService {

    /**
     * 元数据字段定义搜索
     * @param param 搜索条件对象
     * @return 分页的搜索结果
     */
    CompletableFuture<PagingVO<MetaFieldVO>> search(MetaFieldQParam param);

    CompletableFuture<Optional<MetaFieldVO>> oneById(Long id);

    CompletableFuture<List<MetaFieldVO>> listByIds(List<Long> ids);

    CompletableFuture<Long> create(MetaFieldSaveParam metaField);

    void update(MetaFieldSaveParam metaField);

    void removeById(Long id);
}
